package br.com.componentes;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.Point;

import br.com.interfaces.ISprite;

public class SpriteFont implements ISprite
{
	private String texto    = "";
	private Point  location = new Point(0, 0);	
	private Color  color    = Color.BLACK;
	
	public void draw( Graphics2D g2d )
	{
		Graphics2D g = (Graphics2D)g2d.create( );	
		
		Font font = new Font("Fonte", Font.PLAIN, 20 );
		
		g.setFont( font );
		
		g.setColor  ( getColor()                                               );
		g.drawString( getTexto( ) , getLocation().x, getLocation().y + 15 );
		
		g.dispose( );
	}

	public void update( long time ) { }
	
	public void move( int count, int direcao ) { }

	public String getTexto( )
	{
		return texto;
	}

	public void setTexto( String texto )
	{
		this.texto = texto;
	}

	public Point getLocation( )
	{
		return location;
	}

	public void setLocation( Point location )
	{
		this.location = location;
	}

	public Color getColor() {
		return color;
	}

	public void setColor(Color color) {
		this.color = color;
	}
}